package com.tkm.helloWorld

//  kotlin函数入口
fun main() {
    runBlock {
        println("Hello Kotlin")
    }

    runBlock {
        repeat(1000) {
            println("Hello Kotlin $it")
        }
    }
}

//  定义函数
fun runBlock(block: () -> Unit) {
    val start = System.currentTimeMillis()
    block()
    val end = System.currentTimeMillis()
    println("spend: ${end-start}ms")
}
